package org.jetnuke.dao;

import java.util.Date;
import java.util.List;

import org.jetnuke.entities.DownloadsDownloads;

public interface DownloadDownloadDAO {
	public DownloadsDownloads retrieveByPK(int id) throws Exception ;
	public List selectAll()throws Exception;
	public int addNew(DownloadsDownloads dc)throws Exception;
	public void update(DownloadsDownloads top) throws Exception;
	public int countAll() throws Exception ;
	public void incHits(int id)throws Exception;
	public int countUser(int lid, String uname)throws Exception;
	public int countAllByCategory(int cid)throws Exception;
	public List getByHitsDown(int start, int limit )throws Exception;
	public int selectDateGreater(Date dt)throws Exception;
	public int countWithRating()throws Exception;
	public List selectWithRating(int totalVotesMin,int limit) throws Exception;
	public List selectTitleAsc(int cid, int start, int offset)throws Exception;
	public List selectTitleDesc(int cid, int start, int offset)throws Exception;
	public List selectDateAsc(int cid, int start, int offset)throws Exception;
	public List selectDateDesc(int cid, int start, int offset)throws Exception;
	
	public List selectRatingAsc(int cid, int start, int offset)throws Exception;
	public List selectRatingDesc(int cid, int start, int offset)throws Exception;
	public List selectHitsAsc(int cid, int start, int offset)throws Exception;
	public List selectHitsDesc(int cid, int start, int offset)throws Exception;
	public List selectTopDown( int limit)throws Exception;
	public List search(String title, String description, int start, int limit)throws Exception;
	public void deleteByLID(int lid)throws Exception;
	public int countSearch(String title, String description)throws Exception;

	
}
